/* log-style.css */

/* 增强版日志面板样式 */
.log-panel {
    height: 240px;  /* 设置初始高度 */
    min-height: 120px;
    max-height: 50vh;
    display: flex;
    flex-direction: column;
    background: var(--card-background);
    border-top: 1px solid var(--border-color);
    }

  /* 日志头部导航栏 */
  .log-nav {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    gap: 8px;
    height: 16px;
    background: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    }

  /* 选项卡样式 */
  .log-tabs {
    display: flex;
    gap: 1px;
    height: 100%;
    align-items: center;
  }

/* 选项卡按钮样式 */
.log-tab {
    padding: 0 2px;
    height: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-color);
    border: none;
    background: transparent;
    cursor: pointer;
    position: relative;
    opacity: 0.7;
  }

  .log-tab:hover {
    opacity: 0.9;
  }

  .log-tab.active {
    opacity: 1;
    color: var(--primary-color);
  }

  .log-tab i {
    width: 14px;
    height: 14px;
  }

  .log-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
  }

  /* 工具栏 */
  .log-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background: var(--card-background);
    border-bottom: 1px solid var(--border-color);
  }

  /* 搜索框 */
  .log-search {
    display: flex;
    align-items: center;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0 8px;
    height: 24px;
    flex: 1;
    min-width: 200px;
  }

  .log-search i {
    width: 14px;
    height: 14px;
    opacity: 0.5;
  }

  .log-search input {
    border: none;
    background: transparent;
    width: 100%;
    height: 100%;
    font-size: 12px;
    color: var(--text-color);
    outline: none;
    padding: 0 8px;
  }

  /* 工具按钮 */
  .log-tools {
    display: flex;
    gap: 4px;
    margin-left: 8px;
    }

.log-tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-color);
    opacity: 0.7;
    }

    .log-tool-btn:hover {
        opacity: 1;
        background: var(--border-color);
      }

  .log-tool-btn i {
    width: 14px;
    height: 14px;
  }

  /* 日志过滤器 */
  .log-filters {
    display: flex;
    gap: 8px;
    align-items: center;
  }

  .log-filter {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .log-filter.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
  }

  /* 日志内容区域 */
  .log-content {
    flex: 1;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.5;
    padding: 4px 0;
  }

  /* 日志条目 */
  .log-entry {
    padding: 1px 8px;
    display: flex;
    align-items: center;
    white-space: pre;
    font-family: 'Consolas', monospace;
  }

  .log-entry:hover {
    background: var(--background-color);
  }

  .log-entry.error {
    border-left-color: var(--danger-color);
  }

  .log-entry.warning {
    border-left-color: #f59e0b;
  }

  .log-entry.info {
    border-left-color: var(--primary-color);
  }

  /* 日志时间戳 */
  .log-time {
    color: var(--text-color);
    opacity: 0.5;
    min-width: 80px;
  }

  /* 日志级别 */
  .log-level {
    min-width: 60px;
    text-transform: uppercase;
    font-weight: 500;
  }

  /* 日志消息 */
  .log-message {
    flex: 1;
    white-space: pre-wrap;
    word-break: break-all;
  }